<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>${message("admin.deliveryCorp.add")} - 766 SMART HOME</title>
<meta name="author" content="BIZ Team" />
<meta name="copyright" content="BIZ" />
<link href="${base}/resources/admin/css/common.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${base}/resources/admin/js/jquery.js"></script>
<script type="text/javascript" src="${base}/resources/admin/js/jquery.tools.js"></script>
<script type="text/javascript" src="${base}/resources/admin/js/jquery.validate.js"></script>
<script type="text/javascript" src="${base}/resources/admin/js/jquery.autocomplete.js"></script>
<script type="text/javascript" src="${base}/resources/admin/js/common.js"></script>
<script type="text/javascript" src="${base}/resources/admin/js/input.js"></script>
<script type="text/javascript">
$().ready(function() {

	
	var $inputForm = $("#inputForm");
    var $browserButton = $("input.browserButton");

    [#--[@flash_message /]--]

    $browserButton.browser({"type":"file"});
	// 表单验证
	$inputForm.validate({
		rules: {
            customerName: "required",
            customerPhone: "required",
            customerArea: "required",
            customerHouse: "required",
            customerRoom: "required",
//            system: "required",
            infoSource: "required",
            department: "required",
            store: "required",
            recordUserName: "required",
            recordUserPhone: "required",
		}
	});
    $("#system").on('change',function (e){
        var value = $(this).val();
        if(value == '7'){
            $('#system_text').show();
        }else{
            $('#system_text').hide();
        }
    });
	
});
</script>
</head>
<body>
	<div class="path">
		<a href="${base}/admin/common/index.jhtml">${message("admin.path.index")}</a> &raquo; 添加报备表
	</div>
	<form id="inputForm" action="save.jhtml" method="post" enctype="multipart/form-data">
		<table class="input">
			<tr>
				<th>
					<span class="requiredField">*</span>客户姓名:
				</th>
				<td>
					<input type="text" id="customerName" name="customerName" class="text" maxlength="200" />
				</td>
                <th>
                    <span class="requiredField">*</span>联系方式:
                </th>
				<td>
					<input type="text" id="customerPhone" name="customerPhone" class="text" maxlength="15" />
				</td>
			</tr>

            <tr>
                <th>
                    <span class="requiredField">*</span>区域:
                </th>
                <td>
                    <input style="width: 100%;" type="text" id="customerArea" name="customerArea" class="text" maxlength="200" />
                </td>

                <th>
                    是否使用方案:
                </th>
                <td>
                    <input type="checkbox" id="isScheme" name="isScheme" />
                </td>
            </tr>

            <tr>
                <th>
                    <span class="requiredField">*</span>楼盘:
                </th>
                <td>
                    <input style="width: 100%;" type="text" id="customerHouse" name="customerHouse" class="text" maxlength="200" />
                </td>
                <th>
                    <span class="requiredField">*</span>房号:
                </th>
                <td>
                    <input type="text" id="customerRoom" name="customerRoom" class="text" maxlength="20" />
                </td>
            </tr>

            <tr>
                <th>
                    <span class="requiredField">*</span>系统:
                </th>
                <td>
                    <select id="system" name="system" class="option">
                        <option value="">请选择</option>
                        <option value="地暖">地暖</option>
                        <option value="明装暖气片">明装暖气片</option>
                        <option value="暗装暖气片">暗装暖气片</option>
                        <option value="新风">新风</option>
                        <option value="净水">净水</option>
                        <option value="空调">空调</option>
                        <option value="7">其他</option>
                    </select>

                    <input style="display: none;" id="system_text" type="text" name="system_text" class="text" maxlength="200" />
                </td>
                <th>
                    <span class="requiredField">*</span>信息来源:
                </th>
                <td>
                    <input type="text" id="infoSource" name="infoSource" class="text" maxlength="200" />
                </td>
            </tr>

            <tr>
                <th>
                    <span class="requiredField">*</span>部门:
                </th>
                <td>
                    <input type="text" id="department" name="department" class="text" maxlength="200" />
                </td>
                <th>
                    <span class="requiredField">*</span>门店:
                </th>
                <td>
                    <input type="text" id="store" name="store" class="text" maxlength="200" />
                </td>
            </tr>

            <tr>
                <th>
                    <span class="requiredField">*</span>报备人:
                </th>
                <td>
                    <input type="text" id="recordUserName" name="recordUserName" class="text" maxlength="200" />
                </td>
                <th>
                    <span class="requiredField">*</span>报备人联系方式:
                </th>
                <td>
                    <input type="text" id="recordUserPhone" name="recordUserPhone" class="text" maxlength="15" />
                </td>

            </tr>

            <tr>
                <th>
                    <span class="requiredField">*</span>附件:
                </th>
                <td>
					<span class="fieldSet">
						<input type="text" name="fileUrl" class="text" value="" maxlength="200" />
						<input type="button" class="button browserButton" value="${message("admin.browser.select")}" />
					</span>
                </td>
            </tr>
			

			<tr>
				<th>
					&nbsp;
				</th>
				<td>
					<input type="submit" class="button" value="${message("admin.common.submit")}" />
					<input type="button" class="button" value="${message("admin.common.back")}" onclick="location.href='list.jhtml'" />
				</td>
			</tr>
		</table>
	</form>
</body>
</html>